//
//  NSObject+Data.m
//  UIKitExtentions
//
//  Created by Alean on 2022/12/2.
//

#import "NSObject+Data.h"
#import <objc/runtime.h>

static NSString *modelKey = @"modelKey";

@implementation NSObject (Data)

- (void)setModel:(NSObject *)model {
    objc_setAssociatedObject(self, &modelKey, model, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (NSObject *)model {
    return objc_getAssociatedObject(self, &modelKey);
}

@end
